import { httpService } from '@/utils/request'
import type { AddProductParams, Product } from './models'
import type { ApiResponse } from '@/api/types'

/** 新增商品 */
export function addProduct(params: AddProductParams): Promise<ApiResponse<Product>> {
    return httpService.post('/shop/add', params)
}

/** 获取商品详情 */
export function getProductDetail(params: { goodsId: string }): Promise<any> {
    return httpService.get('/shop/detail', params)
}

/** 获取商品列表 */
export function getGoodsList(params?: Record<string, any>): Promise<any> {
    return httpService.get('/shop/list/goods', params || {})
}


